package com.naiterui.ehp.bs.agent.service;

import java.io.IOException;

import org.springframework.web.multipart.MultipartFile;

import com.naiterui.common.repository.page.PageParamVO;
import com.naiterui.common.repository.page.PageVO;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.agent.po.AgentAuthPO;
import com.naiterui.ehp.bs.agent.vo.AgentAuthInfoVO;
import com.naiterui.ehp.bs.agent.vo.AgentDetailVO;
import com.naiterui.ehp.bs.agent.vo.AgentItemVO;
import com.naiterui.ehp.bs.agent.vo.BaseInfoVO;
import com.naiterui.ehp.bs.agent.vo.CustomInviteParamVO;
import com.naiterui.ehp.bs.agent.vo.UserVO;

/**
 * @author yiren
 * @since 2022/2/16
 */
public interface IAgentService {
	UserVO login(String phoneNum, String password, String code) throws BusinessException;

	void resetPwd(String phoneNum, String password, String code) throws BusinessException;

	void resetPhone(Long agentId, String newPhoneNum, String code) throws BusinessException;

	void resetHead(Long agentId, String headUrl);

	AgentAuthInfoVO getAuthInfo(Long agentId) throws BusinessException;

	void saveAuthInfo(AgentAuthPO authPO) throws BusinessException;

	/**
	 * 查询经纪人基本信息
	 * @param agentId
	 * @return
	 */
	BaseInfoVO getBaseInfo(Long agentId);

	CustomInviteParamVO getInviteParam(Long agentId) throws BusinessException;

	AgentDetailVO getDetail(Long agentId) throws BusinessException;

	PageVO<AgentItemVO> findAgentPage(PageParamVO pageParamVO, Long provinceAreaId);

	String uploadFile(Integer type, MultipartFile file) throws IOException, BusinessException;

    void logout(Long agentId, String token) throws BusinessException;

    void sendCode(String phoneNum, Integer type) throws BusinessException;
}
